<%--
  Created by IntelliJ IDEA.
  User: lt
  Date: 2017/6/5
  Time: 13:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML>
<html>
<head>

    <title>实体产品</title>
    <%@ include file="/common/include-core.jsp" %>
    <%@ include file="/common/jspTemplate.jsp" %>
    <style type="text/css">
        table{
            table-layout:fixed;/* 只有定义了表格的布局算法为fixed，下面td的定义才能起作用。 */
        }
        td{
            width:100%;
            word-break:keep-all;/* 不换行 */
            white-space:nowrap;/* 不换行 */
            overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
            text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ；需与overflow:hidden;一起使用。*/
        }
    </style>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 活动审批 <span class="c-gray en">&gt;</span> 活动审核 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="text-c">
        <form action="/admin/productEntity/getProductEntityList.html" method="post" id="searchForm">
            <input type="hidden" id="count" value="${pageinfo.total }" />
            <input type="hidden" id="page" name="page" value="${pageinfo.pageNum }" />
            <input type="hidden" id="pageSize" name="pageSize" value="${pageinfo.pageSize }" />
            <input type="text" name="productEntityName"  value="${bean.productEntityName }" placeholder=" 请输入你要查询的产品名称" style="width:250px" class="input-text">
            <button name="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </form>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" onclick="layerTools.layerShowFullScreen('新增实体产品','/admin/productEntity/getProductEntity.html?productId=${bean.productId}','')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 新增实体产品</a></span> <%--<span class="r">共有数据：<strong>54</strong> 条</span> --%></div>
    <div class="mt-20 portfolio-content">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
                <tr class="text-c">
                    <th width="13%">产品实体名</th>
                    <th width="13%">产品实体介绍</th>
                    <th width="5%">原价格(元)</th>
                    <th width="5%">优惠价格(元)</th>
                    <th width="5%">颜色</th>
                    <th width="5%">数量</th>
                    <th width="5%">状态</th>
                    <th width="10%">操作</th>
                </tr>
            </thead>
            <tbody>
            <c:forEach items="${pageinfo.list}" var="item" varStatus="index">
                <tr class="text-c">
                    <td title="${item.productEntityName }">${item.productEntityName }</td>
                    <td title="${item.productEntityIntroduction }">${item.productEntityIntroduction }</td>
                    <td title="<fmt:formatNumber type="number" value="${item.price/100 } " maxFractionDigits="2"/>">
                        <fmt:formatNumber type="number" value="${item.price/100 } " maxFractionDigits="2"/>
                    </td>      <td title="<fmt:formatNumber type="number" value="${item.realPrice/100 } " maxFractionDigits="2"/>">
                        <fmt:formatNumber type="number" value="${item.realPrice/100 } " maxFractionDigits="2"/>
                    </td>
                    <td title="${item.productEntityColour }" style="background-color:${item.productEntityColourCode} " >${item.productEntityColour }</td>
                    <td title="${item.productEntityAmount }" >${item.productEntityAmount }</td>
                    <td >
                        <c:if test="${item.status==0}">无效</c:if>
                        <c:if test="${item.status==1}">有效</c:if>
                        <c:if test="${item.status==2}">下架</c:if>
                    </td>
                    <td class="td-manage">
                        <a style="text-decoration:none" class="ml-5" onClick="layerTools.layerShowFullScreen('产品实体编辑','/admin/productEntity/getProductEntity.html?productEntityId=${item.productEntityId}','')"
                           href="javascript:;" title="产品实体编辑"><i class="Hui-iconfont">&#xe6df;</i></a>
                        <a style="text-decoration:none" class="ml-5" onClick="layerTools.layerShowFullScreen('产品实体图片编辑','/admin/resource/getResourceRelationList.html?resourceRelationId=${item.productEntityId}','')"
                           href="javascript:;" title="产品实体图片编辑"><i class="Hui-iconfont">&#xe60c;</i></a>
                    <c:if test="${item.productType!=4}">
                        <a style="text-decoration:none" class="ml-5" onClick="layerTools.layerShowFullScreen('产品套餐编辑','/admin/package/getPackageRelationList.html?productEntityId=${item.productEntityId}','')"
                           href="javascript:;" title="套餐编辑"><i class="Hui-iconfont">&#xe647;</i></a>

                        <a style="text-decoration:none" class="ml-5" onClick="makeProductEntitySerial(${item.productEntityId})"
                           href="javascript:;" title="生成产品序列号"><i class="Hui-iconfont">&#xe600;</i></a>
                        <a style="text-decoration:none" class="ml-5" onClick="makeSerialBarCode(${item.productEntityId})"
                           href="javascript:;" title="生成序列号条码"><i class="Hui-iconfont">&#xe61f;</i></a>
                    </c:if>
                        <c:if test="${item.status!=0}">
                        <a style="text-decoration:none" class="ml-5" onClick="modifyProductEntityStatus('${item.productEntityId}','0');"
                           href="javascript:;" title="产品无效"><i class="Hui-iconfont">&#xe631;</i></a>

                        </c:if>
                        <c:if test="${item.status!=2}">
                        <a style="text-decoration:none" class="ml-5" onClick="modifyProductEntityStatus('${item.productEntityId}','2')"
                           href="javascript:;" title="产品下架"><i class="Hui-iconfont">&#xe6de;</i></a>
                        </c:if>
                        <c:if test="${item.status!=1}">
                        <a style="text-decoration:none" class="ml-5" onClick="modifyProductEntityStatus('${item.productEntityId}','1')"
                           href="javascript:;" title="产品有效"><i class="Hui-iconfont">&#xe6e1;</i></a>
                        </c:if>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <div class="ui-page tr mt10" style="float: right;margin-top: 10px;margin-bottom: 10px"></div>
    </div>
</div>
<script type="text/javascript" src="/static/js/admin/product/getProductEntityList.js"></script>
<%@ include file="/common/include-footer.jsp" %>
</body>
</html>
